/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package co.edu.unal.bioingenium.kbmed.text.filter2;

import co.edu.unal.bioingenium.kbmed.text.filter.Stemmer;

/**
 *
 * @author Alejandro Riveros Cruz
 */
public class StemmerFilter implements Filter {

    private Stemmer stemmer;

    /**
     * 
     */
    @Override
    public void init() {
        stemmer = new Stemmer();
    }

    /**
     * 
     * @param s
     * @return
     */
    @Override
    public StringBuilder doFilter(StringBuilder s) {
        return new StringBuilder(stemmer.stem(s.toString()));
    }
}
